#!/bin/bash

# Program:
#     Use loop to calculate "1+2+3+...+100" result.
# History:
#     2015/08/25    wxb    First release

i=0
s=0

while [ "$i" -lt "100" ]
do
    i=$(($i+1))
    s=$(($s+$i))
done

echo "The result of 1+2+3+....+100 is : " $s
